Integrand size = 23, antiderivative size = 140 \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{\sqrt {a-i b} d}+\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d}-\frac {4 a \sqrt {a+b \tan (c+d x)}}{3 b^2 d}+\frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d} \]
[Out]
Time = 0.33 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3647, 3711, 12, 3620, 3618, 65, 214} \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d \sqrt {a-i b}}+\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d \sqrt {a+i b}}-\frac {4 a \sqrt {a+b \tan (c+d x)}}{3 b^2 d}+\frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d} \]
[In]
[Out]
Rule 12
Rule 65
Rule 214
Rule 3618
Rule 3620
Rule 3647
Rule 3711
Rubi steps \begin{align*} \text {integral}& = \frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d}+\frac {2 \int \frac {-a-\frac {3}{2} b \tan (c+d x)-a \tan ^2(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx}{3 b} \\ & = -\frac {4 a \sqrt {a+b \tan (c+d x)}}{3 b^2 d}+\frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d}+\frac {2 \int -\frac {3 b \tan (c+d x)}{2 \sqrt {a+b \tan (c+d x)}} \, dx}{3 b} \\ & = -\frac {4 a \sqrt {a+b \tan (c+d x)}}{3 b^2 d}+\frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d}-\int \frac {\tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx \\ & = -\frac {4 a \sqrt {a+b \tan (c+d x)}}{3 b^2 d}+\frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d}-\frac {1}{2} i \int \frac {1-i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx+\frac {1}{2} i \int \frac {1+i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx \\ & = -\frac {4 a \sqrt {a+b \tan (c+d x)}}{3 b^2 d}+\frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d}-\frac {\text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}-\frac {\text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d} \\ & = -\frac {4 a \sqrt {a+b \tan (c+d x)}}{3 b^2 d}+\frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d}+\frac {i \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}-\frac {i \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d} \\ & = \frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{\sqrt {a-i b} d}+\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d}-\frac {4 a \sqrt {a+b \tan (c+d x)}}{3 b^2 d}+\frac {2 \tan (c+d x) \sqrt {a+b \tan (c+d x)}}{3 b d} \\ \end{align*}
Time = 0.79 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.14 \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {3 \sqrt {a-i b} (a+i b) b^2 \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )-(a-i b) \left (-3 \sqrt {a+i b} b^2 \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )+2 (a+i b) (2 a-b \tan (c+d x)) \sqrt {a+b \tan (c+d x)}\right )}{3 b^2 \left (a^2+b^2\right ) d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(376\) vs. \(2(116)=232\).
Time = 0.09 (sec) , antiderivative size = 377, normalized size of antiderivative = 2.69
method | result | size |
derivativedivides | \(\frac {\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}-2 a \sqrt {a +b \tan \left (d x +c \right )}+2 b^{2} \left (\frac {-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (\sqrt {a^{2}+b^{2}}-a \right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 \sqrt {a^{2}+b^{2}}}+\frac {\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (a -\sqrt {a^{2}+b^{2}}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 \sqrt {a^{2}+b^{2}}}\right )}{d \,b^{2}}\) | \(377\) |
default | \(\frac {\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}-2 a \sqrt {a +b \tan \left (d x +c \right )}+2 b^{2} \left (\frac {-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (\sqrt {a^{2}+b^{2}}-a \right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 \sqrt {a^{2}+b^{2}}}+\frac {\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (a -\sqrt {a^{2}+b^{2}}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 \sqrt {a^{2}+b^{2}}}\right )}{d \,b^{2}}\) | \(377\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 743 vs. \(2 (112) = 224\).
Time = 0.25 (sec) , antiderivative size = 743, normalized size of antiderivative = 5.31 \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=-\frac {3 \, b^{2} d \sqrt {\frac {{\left (a^{2} + b^{2}\right )} d^{2} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} + a}{{\left (a^{2} + b^{2}\right )} d^{2}}} \log \left ({\left ({\left (a^{2} + b^{2}\right )} d^{3} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} - a d\right )} \sqrt {\frac {{\left (a^{2} + b^{2}\right )} d^{2} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} + a}{{\left (a^{2} + b^{2}\right )} d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - 3 \, b^{2} d \sqrt {\frac {{\left (a^{2} + b^{2}\right )} d^{2} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} + a}{{\left (a^{2} + b^{2}\right )} d^{2}}} \log \left (-{\left ({\left (a^{2} + b^{2}\right )} d^{3} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} - a d\right )} \sqrt {\frac {{\left (a^{2} + b^{2}\right )} d^{2} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} + a}{{\left (a^{2} + b^{2}\right )} d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - 3 \, b^{2} d \sqrt {-\frac {{\left (a^{2} + b^{2}\right )} d^{2} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} - a}{{\left (a^{2} + b^{2}\right )} d^{2}}} \log \left ({\left ({\left (a^{2} + b^{2}\right )} d^{3} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} + a d\right )} \sqrt {-\frac {{\left (a^{2} + b^{2}\right )} d^{2} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} - a}{{\left (a^{2} + b^{2}\right )} d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) + 3 \, b^{2} d \sqrt {-\frac {{\left (a^{2} + b^{2}\right )} d^{2} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} - a}{{\left (a^{2} + b^{2}\right )} d^{2}}} \log \left (-{\left ({\left (a^{2} + b^{2}\right )} d^{3} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} + a d\right )} \sqrt {-\frac {{\left (a^{2} + b^{2}\right )} d^{2} \sqrt {-\frac {b^{2}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d^{4}}} - a}{{\left (a^{2} + b^{2}\right )} d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - 4 \, \sqrt {b \tan \left (d x + c\right ) + a} {\left (b \tan \left (d x + c\right ) - 2 \, a\right )}}{6 \, b^{2} d} \]
[In]
[Out]
\[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\int \frac {\tan ^{3}{\left (c + d x \right )}}{\sqrt {a + b \tan {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\int { \frac {\tan \left (d x + c\right )^{3}}{\sqrt {b \tan \left (d x + c\right ) + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\text {Timed out} \]
[In]
[Out]
Time = 5.68 (sec) , antiderivative size = 827, normalized size of antiderivative = 5.91 \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {2\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{3/2}}{3\,b^2\,d}-\frac {2\,a\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{b^2\,d}+\mathrm {atan}\left (-\frac {b^2\,\sqrt {\frac {a}{4\,a^2\,d^2+4\,b^2\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,a^2\,d^2+4\,b^2\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,32{}\mathrm {i}}{\frac {16\,b^2}{d}-\frac {64\,a^2\,b^2\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {a\,b^3\,d^2\,64{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}}+\frac {a^2\,b^2\,\sqrt {\frac {a}{4\,a^2\,d^2+4\,b^2\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,a^2\,d^2+4\,b^2\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,128{}\mathrm {i}}{\frac {64\,b^4}{d}+\frac {64\,a^2\,b^2}{d}-\frac {256\,a^2\,b^4\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {a^3\,b^3\,d^2\,256{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}-\frac {256\,a^4\,b^2\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {a\,b^5\,d^2\,256{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}}+\frac {128\,a\,b^3\,\sqrt {\frac {a}{4\,a^2\,d^2+4\,b^2\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,a^2\,d^2+4\,b^2\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {64\,b^4}{d}+\frac {64\,a^2\,b^2}{d}-\frac {256\,a^2\,b^4\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {a^3\,b^3\,d^2\,256{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}-\frac {256\,a^4\,b^2\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {a\,b^5\,d^2\,256{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}}\right )\,\sqrt {\frac {a-b\,1{}\mathrm {i}}{4\,a^2\,d^2+4\,b^2\,d^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {b^2\,\sqrt {\frac {1}{a\,d^2-b\,d^2\,1{}\mathrm {i}}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,16{}\mathrm {i}}{\frac {16\,b^2}{d}-\frac {16\,a\,b^2\,d^2}{a\,d^3-b\,d^3\,1{}\mathrm {i}}}+\frac {a\,b^2\,\sqrt {\frac {1}{a\,d^2-b\,d^2\,1{}\mathrm {i}}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,16{}\mathrm {i}}{\frac {b^3\,16{}\mathrm {i}}{d}-\frac {16\,a\,b^2}{d}-\frac {a\,b^3\,d^2\,16{}\mathrm {i}}{a\,d^3-b\,d^3\,1{}\mathrm {i}}+\frac {16\,a^2\,b^2\,d^2}{a\,d^3-b\,d^3\,1{}\mathrm {i}}}\right )\,\sqrt {\frac {1}{a\,d^2-b\,d^2\,1{}\mathrm {i}}}\,1{}\mathrm {i} \]
[In]
[Out]